<%-- 
    Document   : PublicoEvento
    Created on : 24-11-2013, 05:47:59 PM
    Author     : USUARIO
--%>

<%@page import="libreriaTicket.entity.Evento"%>
<%@page import="libreriaTicket.dao.DaoEvento"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    String valor =(String)session.getAttribute("nombre");
    int valorId=0;
    if(request.getParameter("id")!=null)
        valorId = Integer.parseInt(request.getParameter("id"));
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>TicketMarket</title>
        <link href="publico/css/bootstrap-theme.css" rel="stylesheet" media="screen">
        <link href="publico/css/bootstrap.css" rel="stylesheet" media="screen">
        <link href="publico/css/bootstrap-select.css" rel="stylesheet" media="screen">
        <script src="publico/script/jquery.js" type="text/javascript"></script>
        <script src="js/bootstrap.js" type="text/javascript"></script>
        <script src="js/bootstrap-select.js" type="text/javascript"></script>
    </head>
    <body>
        <%
                if(valor!=null){
                    %><jsp:include page="ingresado.jsp" flush="true"/><%
                }else{
                    %><jsp:include page="menu.html" flush="true"/><%
                }
            %>
              <div class="jumbotron" style="margin-top:10px">
      <div class="container">
          <jsp:include page="slider.html" flush="true"/>
      </div>
    </div>
            <div class="container" style="padding-top: 30px">
                <div class="row">
          <%
                if(valorId != 0){
                Evento evento = DaoEvento.sqlSelect(new Evento(valorId));
                out.write("<div class=\"col-md-4\">");
                out.write("<p>"+evento.getImagen()+"</p>");
                out.write("<h2>"+evento.getNombre()+"</h2>");
                out.write("<label>Fecha</label><p>"+evento.getFechaEvento()+"</p>");
                out.write("<label>Hora</label><p>"+evento.getHora()+"</p>");
                out.write("</div>");
                out.write("<div class=\"col-md-4\">");
                out.write("<label>Cantidad</label>");
                out.write("<select class='selectpicker'>"
                        + "<option>1</option>"
                        + "<option>2</option>"
                        + "<option>3</option>"
                        + "</select>");
                out.write("</div>");
                return;
                }
                response.sendRedirect(request.getHeader("Referer"));
            
            %>
        
            
      </div>
                
            </div>
    </body>
</html>
